.class Lcom/teewoo/app/bus/ui/js/JSInterface$4;
.super Ljava/lang/Object;
.source "JSInterface.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/teewoo/app/bus/ui/js/JSInterface;->showStationInfo(I)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/teewoo/app/bus/ui/js/JSInterface;

.field private final synthetic val$id:I


# direct methods
.method constructor <init>(Lcom/teewoo/app/bus/ui/js/JSInterface;I)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/teewoo/app/bus/ui/js/JSInterface$4;->this$0:Lcom/teewoo/app/bus/ui/js/JSInterface;

    iput p2, p0, Lcom/teewoo/app/bus/ui/js/JSInterface$4;->val$id:I

    .line 204
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 4

    .prologue
    .line 206
    sget-object v2, Lcom/teewoo/app/bus/ui/js/JSInterface;->nearByStation:Ljava/util/List;

    if-nez v2, :cond_1

    .line 215
    :cond_0
    :goto_0
    return-void

    .line 208
    :cond_1
    sget-object v2, Lcom/teewoo/app/bus/ui/js/JSInterface;->nearByStation:Ljava/util/List;

    iget v3, p0, Lcom/teewoo/app/bus/ui/js/JSInterface$4;->val$id:I

    invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/teewoo/app/bus/model/Station;

    .line 209
    .local v1, station:Lcom/teewoo/app/bus/model/Station;
    if-eqz v1, :cond_0

    .line 211
    new-instance v0, Landroid/content/Intent;

    iget-object v2, p0, Lcom/teewoo/app/bus/ui/js/JSInterface$4;->this$0:Lcom/teewoo/app/bus/ui/js/JSInterface;

    invoke-static {v2}, Lcom/teewoo/app/bus/ui/js/JSInterface;->access$2(Lcom/teewoo/app/bus/ui/js/JSInterface;)Landroid/content/Context;

    move-result-object v2

    const-class v3, Lcom/teewoo/app/bus/ui/LinePassByStation;

    invoke-direct {v0, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 212
    .local v0, it:Landroid/content/Intent;
    const-string v2, "com.teewoo.app.bus.stationId"

    invoke-virtual {v1}, Lcom/teewoo/app/bus/model/Station;->getId()Ljava/lang/Integer;

    move-result-object v3

    invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 213
    const-string v2, "com.teewoo.app.bus.stationName"

    invoke-virtual {v1}, Lcom/teewoo/app/bus/model/Station;->getName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 214
    iget-object v2, p0, Lcom/teewoo/app/bus/ui/js/JSInterface$4;->this$0:Lcom/teewoo/app/bus/ui/js/JSInterface;

    invoke-static {v2}, Lcom/teewoo/app/bus/ui/js/JSInterface;->access$2(Lcom/teewoo/app/bus/ui/js/JSInterface;)Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto :goto_0
.end method
